import VueRouter from "vue-router";
export default new VueRouter({
  mode: "hash",
  routes: [
    {
      path: "/",
      component: () => import("@/pages/IndexPage"),
      meta: { requiresAuth: false, title: "" }, //requiresAuth登录权限
    },
    {
      path: "/version-choice",
      name: "version-choice",
      component: () => import("@/pages/VersionChoice"),
      meta: { requiresAuth: false, title: "版本选择" },
    },
    {
      path: "/person-lunch",
      name: "person-lunch",
      component: () => import("@/pages/person/LunchPage"),
      meta: { requiresAuth: false, title: "启动页" },
    },
    {
      path: "/person-main",
      name: "person-main",
      component: () => import("@/pages/person/MainPage"),
      meta: { requiresAuth: false, title: "首页" },
    },
    {
      path: "/person/banner/web",
      name: "person-banner-web",
      component: () => import("@/pages/person/home/BannerWeb"),
      meta: { requiresAuth: false, title: "首页轮播图" },
    },
    {
      path: "/person/xczph/list",
      name: "person-xczph",
      component: () => import("@/pages/person/home/xczph/ZPHList"),
      meta: { requiresAuth: false, title: "现场招聘会" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/xczph/info",
      name: "person-xczph-info",
      component: () => import("@/pages/person/home/xczph/ZPHInfo"),
      meta: { requiresAuth: false, title: "现场招聘会详情" },
      props($route) {
        return {
          title: $route.meta.title,
          id: $route.query.id,
          zphData: $route.params.zphData,
        };
      },
    },
    {
      path: "/person/xczph/company",
      name: "person-xczph-company",
      component: () => import("@/pages/person/home/xczph/CompanyInfo"),
      meta: { requiresAuth: false, title: "企业详情" },
      props($route) {
        return {
          xczphid: $route.params.xczphid,
          companyid: $route.params.companyid,
          joblist: $route.params.joblist,
        };
      },
    },
    {
      path: "/person/bagua/index",
      name: "person-bagua",
      component: () => import("@/pages/person/home/bagua/IndexMain"),
      meta: { requiresAuth: false, title: "匿名八卦" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/bagua/publish",
      name: "person-bagua-publish",
      component: () => import("@/pages/person/home/bagua/Publish"),
      meta: { requiresAuth: true, title: "八卦发帖" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/bagua/my",
      name: "person-bagua-my",
      component: () => import("@/pages/person/home/bagua/MyBaGua"),
      meta: { requiresAuth: true, title: "我的八卦" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/bagua/tip",
      name: "person-bagua-tip",
      component: () => import("@/pages/person/home/bagua/BaGuaTip"),
      meta: { requiresAuth: false, title: "匿名八卦版规" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/job/jobinfo",
      name: "person-jobinfo",
      component: () => import("@/pages/person/job/JobInfo"),
      meta: { requiresAuth: false, title: "职位详情" },
    },
    {
      path: "/person/job/report",
      name: "person-job-report",
      component: () => import("@/pages/person/job/JobReport"),
      meta: { requiresAuth: true, title: "举报职位" },
      props($route) {
        return {
          title: $route.meta.title,
          jobid: $route.params.jobid,
          jobname: $route.params.jobname,
        };
      },
    },
    {
      path: "/person/job/company",
      name: "person-companyinfo",
      component: () => import("@/pages/person/job/CompanyInfo"),
      meta: { requiresAuth: false, title: "企业详情" },
    },
    {
      path: "/person/job/companymap",
      name: "person-companyinfo-map",
      component: () => import("@/pages/person/job/CompanyMap"),
      meta: { requiresAuth: false, title: "企业地图" },
      props($route) {
        return { title: $route.meta.title, companyid: $route.query.companyid };
      },
    },
    {
      path: "/person/news/list",
      name: "person-news-list",
      component: () => import("@/pages/person/home/news/NewsList"),
      meta: { requiresAuth: false },
    },
    {
      path: "/person/news/info",
      name: "person-news-info",
      component: () => import("@/pages/person/home/news/NewsInfo"),
      meta: { requiresAuth: false },
    },
    {
      path: "/person/famous-company",
      name: "person-famous-company",
      component: () => import("@/pages/person/home/news/FamousCompany"),
      meta: { requiresAuth: false, title: "名企专区" },
    },
    {
      path: "/person/zbj",
      name: "person-zbj",
      component: () => import("@/pages/person/home/news/ZBJList"),
      meta: { requiresAuth: false, title: "嘉聘会直播间" },
    },
    {
      path: "/person/zbj/video",
      name: "person-zbj-video",
      component: () => import("@/pages/person/home/news/ZBJVideo"),
      meta: { requiresAuth: false, title: "嘉聘会直播间" },
    },
    {
      path: "/person/asklist",
      name: "person-asklist",
      component: () => import("@/pages/person/job/AskList"),
      meta: { requiresAuth: false, title: "问答列表" },
      props($route) {
        return { list: $route.params.list, title: $route.meta.title };
      },
    },
    {
      path: "/person/ask",
      name: "person-ask",
      component: () => import("@/pages/person/job/AskSub"),
      meta: { requiresAuth: true, title: "我要提问" },
      props($route) {
        return {
          title: $route.meta.title,
          jobid: $route.params.jobid,
          jobname: $route.params.jobname,
          companyid: $route.params.companyid,
          companyname: $route.params.companyname,
        };
      },
    },
    {
      path: "/person/search/index",
      name: "person-search-index",
      component: () => import("@/pages/person/home/SearchIndex"),
      meta: { requiresAuth: false, title: "搜索职位" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/search/result",
      name: "person-search-result",
      component: () => import("@/pages/person/home/SearchResult"),
      meta: { requiresAuth: false, title: "搜索职位" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/search/result/moreapply",
      name: "person-search-result-moreapply",
      component: () => import("@/pages/person/home/SearchResultMoreApply"),
      meta: { requiresAuth: true, title: "批量投递" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/login/index",
      name: "person-login",
      component: () => import("@/pages/person/login/LoginIndex"),
      meta: { requiresAuth: false, title: "登录" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/login/xy",
      name: "person-login-xy",
      component: () => import("@/pages/person/login/UserXY"),
      meta: { requiresAuth: false, title: "用户协议" },
      props($route) {
        return { title: $route.meta.title, type: $route.query.type };
      },
    },
    {
      path: "/person/my/collectJob",
      name: "person-my-collectJob",
      component: () => import("@/pages/person/my/CollectJob"),
      meta: { requiresAuth: true, title: "收藏职位" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/whoReadMe",
      name: "person-my-whoReadMe",
      component: () => import("@/pages/person/my/WhoReadMe"),
      meta: { requiresAuth: true, title: "谁看过我" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/viewJobHis",
      name: "person-my-viewJobHis",
      component: () => import("@/pages/person/my/ViewJobHis"),
      meta: { requiresAuth: true, title: "浏览足迹" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/ask",
      name: "person-my-ask",
      component: () => import("@/pages/person/my/AskList"),
      meta: { requiresAuth: true, title: "企业问答" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/feedback",
      name: "person-feedback",
      component: () => import("@/pages/person/my/FeedBack"),
      meta: { requiresAuth: true, title: "意见反馈" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/refuse",
      name: "person-refuse",
      component: () => import("@/pages/person/my/RefuseCompany"),
      meta: { requiresAuth: true, title: "屏蔽企业" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/refuseAdd",
      name: "person-refuse-add",
      component: () => import("@/pages/person/my/RefuseCompanySearch"),
      meta: { requiresAuth: true, title: "屏蔽企业" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/setting",
      name: "person-setting",
      component: () => import("@/pages/person/my/setting/IndexPage"),
      meta: { requiresAuth: true, title: "设置" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/wxgzh",
      name: "person-wxgzh",
      component: () => import("@/pages/person/my/WXGZH"),
      meta: { requiresAuth: false, title: "关注公众号" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/wxkf",
      name: "person-wxkf",
      component: () => import("@/pages/person/my/WXKF"),
      meta: { requiresAuth: false, title: "微信客服" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/bsdh",
      name: "person-my-bsdh",
      component: () => import("@/pages/person/my/BSTel"),
      meta: { requiresAuth: false, title: "办事电话" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/setting/account",
      name: "person-setting-account",
      component: () => import("@/pages/person/my/setting/account/AccountIndex"),
      meta: { requiresAuth: true, title: "我的账号" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/setting/account/bindphone",
      name: "person-setting-account-bindphone",
      component: () => import("@/pages/person/my/setting/account/BindPhone"),
      meta: { requiresAuth: true, title: "绑定手机" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/setting/changepwd",
      name: "person-setting-changepwd",
      component: () => import("@/pages/person/my/setting/ChangePWD"),
      meta: { requiresAuth: true, title: "修改密码" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/my/setting/about",
      name: "person-my-setting-about",
      component: () => import("@/pages/person/my/setting/AboutUs"),
      meta: { requiresAuth: false, title: "关于我们" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/jobSubscribe",
      name: "person-jobSubscribe",
      component: () => import("@/pages/person/home/JobSubscribe"),
      meta: { requiresAuth: true, title: "订阅职位" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/resume/all",
      name: "person-resume-all",
      component: () => import("@/pages/person/resume/resumeAll/ResumeAll"),
      meta: { requiresAuth: true, title: "我的简历" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/resume/baseinfo",
      name: "person-resume-baseinfo",
      component: () => import("@/pages/person/resume/resumeAll/ResumeBaseInfo"),
      meta: { requiresAuth: true, title: "基本信息" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/jobwanted",
      name: "person-resume-jobwanted",
      component: () =>
        import("@/pages/person/resume/resumeAll/ResumeJobWanted"),
      meta: { requiresAuth: true, title: "求职意向" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/edu",
      name: "person-resume-edu",
      component: () => import("@/pages/person/resume/resumeAll/ResumeEdu"),
      meta: { requiresAuth: true, title: "教育培训" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/work",
      name: "person-resume-work",
      component: () => import("@/pages/person/resume/resumeAll/ResumeWork"),
      meta: { requiresAuth: true, title: "工作经历" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/self",
      name: "person-resume-self",
      component: () => import("@/pages/person/resume/resumeAll/ResumeSelf"),
      meta: { requiresAuth: true, title: "自我评价" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/skill",
      name: "person-resume-skill",
      component: () => import("@/pages/person/resume/resumeAll/ResumeSkill"),
      meta: { requiresAuth: true, title: "专业技能" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/zs",
      name: "person-resume-zs",
      component: () => import("@/pages/person/resume/resumeAll/ResumeZS"),
      meta: { requiresAuth: true, title: "获得证书" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resume/addinfo",
      name: "person-resume-addinfo",
      component: () => import("@/pages/person/resume/resumeAll/ResumeAddInfo"),
      meta: { requiresAuth: true, title: "附加信息" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resumequick/resumequick1",
      name: "person-resume-resumequick1",
      component: () => import("@/pages/person/resume/resumeQuick/ResumeQuick1"),
      meta: { requiresAuth: true, title: "基本信息" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/resumequick/resumequick2",
      name: "person-resume-resumequick2",
      component: () => import("@/pages/person/resume/resumeQuick/ResumeQuick2"),
      meta: { requiresAuth: true, title: "教育经历" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/resumequick/resumequick3",
      name: "person-resume-resumequick3",
      component: () => import("@/pages/person/resume/resumeQuick/ResumeQuick3"),
      meta: { requiresAuth: true, title: "工作经历" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/resumequick/resumequick4",
      name: "person-resume-resumequick4",
      component: () => import("@/pages/person/resume/resumeQuick/ResumeQuick4"),
      meta: { requiresAuth: true, title: "完成" },
      props($route) {
        return { title: $route.meta.title };
      },
    },
    {
      path: "/person/applyjob",
      name: "person-applyjob",
      component: () => import("@/pages/person/resume/ApplyJob"),
      meta: { requiresAuth: true, title: "我的投递" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/interview",
      name: "person-interview",
      component: () => import("@/pages/person/resume/InterView"),
      meta: { requiresAuth: true, title: "面试通知" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/interviewinfo",
      name: "person-interviewinfo",
      component: () => import("@/pages/person/resume/InterViewInfo"),
      meta: { requiresAuth: true, title: "面试通知" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/resumefile",
      name: "person-resumefile",
      component: () => import("@/pages/person/resume/ResumeFile"),
      meta: { requiresAuth: true, title: "附件简历" },
      props($route) {
        return { title: $route.meta.title, data: $route.params.data };
      },
    },
    {
      path: "/person/im",
      name: "person-im",
      component: () => import("@/pages/person/im/IMMessage"),
      meta: { requiresAuth: true, title: "聊天" },
      props($route) {
        return {
          title: $route.meta.title,
          cid: $route.query.cid,
          companyid: $route.query.companyid,
        };
      },
    },
    //企业部分 ********************************************************************************
    {
      path: "/company/job/batch",
      name: "company-job-batch",
      component: () => import("@/pages/company/job/JobBatch"),
      meta: { requiresAuth: true, title: "批量操作" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/forget",
      name: "company-forget",
      component: () => import("@/pages/company/Forget"),
      meta: { requiresAuth: false, title: "忘记密码" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/register",
      name: "company-register",
      component: () => import("@/pages/company/Register"),
      meta: { requiresAuth: false, title: "注册" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/settingpassword",
      name: "company-my-settingpassword",
      component: () => import("@/pages/company/my/SettingPassword"),
      meta: { requiresAuth: true, title: "设置" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/settingbind",
      name: "company-my-settingbind",
      component: () => import("@/pages/company/my/SettingBind"),
      meta: { requiresAuth: true, title: "设置" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/settingindex",
      name: "company-my-settingindex",
      component: () => import("@/pages/company/my/SettingIndex"),
      meta: { requiresAuth: true, title: "设置" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/rcdexplain",
      name: "company-my-rcdexplain",
      component: () => import("@/pages/company/my/RcdExplain"),
      meta: { requiresAuth: true, title: "人才点说明" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/wallet",
      name: "company-my-wallet",
      component: () => import("@/pages/company/my/wallet"),
      meta: { requiresAuth: true, title: "我的钱包" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/service/jobtopbuy",
      name: "company-my-service-jobtopbuy",
      component: () => import("@/pages/company/my/ServiceJobTopBuy"),
      meta: { requiresAuth: true, title: "购买职位置顶" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/serviceindex",
      name: "company-my-serviceindex",
      component: () => import("@/pages/company/my/ServiceIndex"),
      meta: { requiresAuth: true, title: "企业详情" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/photoUpload",
      name: "company-my-photos",
      component: () => import("@/pages/company/my/photoUpload"),
      meta: { requiresAuth: true, title: "企业相册" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/info",
      name: "company-my-info",
      component: () => import("@/pages/company/my/Info"),
      meta: { requiresAuth: true, title: "企业详情" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/invite",
      name: "company-my-invite",
      component: () => import("@/pages/company/my/Invite"),
      meta: { requiresAuth: true, title: "面试日程" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/membership",
      name: "company-my-membership",
      component: () => import("@/pages/company/my/MemberShip"),
      meta: { requiresAuth: false, title: "我的客服" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/my/member",
      name: "company-my-member",
      component: () => import("@/pages/company/my/Member"),
      meta: { requiresAuth: true, title: "会员信息" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/im/index",
      name: "company-im-index",
      component: () => import("@/pages/company/im/Index"),
      meta: { requiresAuth: true, title: "消息" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/job/publish",
      name: "company-job-publish",
      component: () => import("@/pages/company/job/JobPublish"),
      meta: { requiresAuth: true, title: "发布职位" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/job/index",
      name: "company-job-index",
      component: () => import("@/pages/company/job/JobIndex"),
      meta: { requiresAuth: true, title: "职位首页" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/resume/readme",
      name: "company-resume-readme",
      component: () => import("@/pages/company/resume/ReadMe"),
      meta: { requiresAuth: true, title: "谁看过我" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //收藏的简历
      path: "/company/resume/collect",
      name: "company-resume-collect",
      component: () => import("@/pages/company/resume/Collect"),
      meta: { requiresAuth: true, title: "收藏简历" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //获取的简历
      path: "/company/resume/gain",
      name: "company-resume-gain",
      component: () => import("@/pages/company/resume/Gain"),
      meta: { requiresAuth: true, title: "获取简历" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //收件箱
      path: "/company/resume/receive",
      name: "company-resume-receive",
      component: () => import("@/pages/company/resume/ReceiveList"),
      meta: { requiresAuth: true, title: "收到简历" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //简历详情
      path: "/company/resume/info",
      name: "company-resume-info",
      component: () => import("@/pages/company/resume/ResumeInfo"),
      meta: { requiresAuth: true, title: "简历预览" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //面试通知
      path: "/company/resume/interview",
      name: "company-resume-interview",
      component: () => import("@/pages/company/resume/Interview"),
      meta: { requiresAuth: true, title: "面试通知" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //聊天详情
      path: "/company/im/window",
      name: "company-im-window",
      component: () => import("@/pages/company/im/Window"),
      meta: { requiresAuth: true, title: "聊天" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //登录
      path: "/company-login",
      name: "company-login",
      component: () => import("@/pages/company/LoginPage"),
      meta: { requiresAuth: false, title: "企业登录" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/reg",
      name: "company-reg",
      component: () => import("@/pages/company/RegPage"),
      meta: { requiresAuth: false, title: "企业注册" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      //主页
      path: "/company-main",
      name: "company-main",
      component: () => import("@/pages/company/MainPage"),
      meta: { requiresAuth: true, title: "首页" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/kf/restarted",
      name: "company-kf-restarted",
      component: () => import("@/pages/company/RestartedKF"),
      meta: { requiresAuth: false, title: "我的客服" },
      props($route) {
        return {
          title: $route.meta.title,
          isReg: $route.params.isReg,
          companyid: $route.params.companyid,
        };
      },
    },
    {
      path: "/company/feedback",
      name: "company-feedback",
      component: () => import("@/pages/company/my/FeedBack"),
      meta: { requiresAuth: true, title: "意见反馈" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/collect",
      name: "company-collect",
      component: () => import("@/pages/company/my/CollectResume"),
      meta: { requiresAuth: true, title: "我的收藏" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/readme",
      name: "company-readme",
      component: () => import("@/pages/company/my/ReadMe"),
      meta: { requiresAuth: true, title: "谁看过我" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/job/onlineBatch",
      name: "company-job-online-batch",
      component: () => import("@/pages/company/job/JobOnlineBatch"),
      meta: { requiresAuth: true, title: "在招职位批量操作" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/job/offlineBatch",
      name: "company-job-offline-batch",
      component: () => import("@/pages/company/job/JobOfflineBatch"),
      meta: { requiresAuth: true, title: "停止职位批量操作" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/common/imReport",
      name: "company-im-report",
      component: () => import("@/pages/common/IMReport"),
      meta: { requiresAuth: true, title: "举报" },
      props($route) {
        return {
          title: $route.meta.title,
          reportUserType: $route.query.reportUserType,
          reportedID: $route.query.reportedID,
          name: $route.query.name,
        };
      },
    },
    {
      path: "/person/home/Assistant",
      name: "person-assistant",
      component: () => import("@/pages/person/home/Assistant"),
      meta: { requiresAuth: true, title: "求职助手" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/home/Esay",
      name: "person-esay",
      component: () => import("@/pages/person/home/Esay"),
      meta: { requiresAuth: false, title: "一句话招聘" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/person/home/qzq",
      name: "person-qzq",
      component: () => import("@/pages/person/home/qzq"),
      meta: { requiresAuth: false, title: "求职群" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/poster/JobSel",
      name: "company-poster-jobsel",
      component: () => import("@/pages/company/poster/JobSel"),
      meta: { requiresAuth: true, title: "招聘海报" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/poster/chooseTemplet",
      name: "company-poster-chooseTemplet",
      component: () => import("@/pages/company/poster/ChooseTemplet"),
      meta: { requiresAuth: true, title: "选择模板" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
    {
      path: "/company/poster/preview",
      name: "company-poster-preview",
      component: () => import("@/pages/company/poster/Preview"),
      meta: { requiresAuth: true, title: "海报预览" },
      props($route) {
        return {
          title: $route.meta.title,
        };
      },
    },
  ],
  scrollBehavior(to, from, savedPosition) {
    if (savedPosition) {
      return savedPosition;
    } else {
      return { x: 0, y: 0 };
    }
  },
});

// 解决Vue-Router升级导致的Uncaught(in promise) navigation guard问题
const originalPush = VueRouter.prototype.push;
VueRouter.prototype.push = function push(location, onResolve, onReject) {
  if (onResolve || onReject)
    return originalPush.call(this, location, onResolve, onReject);
  return originalPush.call(this, location).catch((err) => err);
};
